package com.luo.demo;

/**
 * @author: luosiyu
 * @Description:
 * @Version: 1.0
 */

public class test_4 {
    public static void main(String[] age){
        System.out.println("-------第一种构造方法---------");
        Date date = new Date(31,12,2021);
        date.tomorrow();
        date.yesteday();
        date.daysinyear();
        System.out.println("----------------------------");
        System.out.println("-------第二种构造方法---------");
        Date date1 = new Date(new int[]{1,1,2022});
        date1.tomorrow();
        date1.yesteday();
        date1.daysinyear();
        System.out.println("-----------------------------");
        System.out.println("-------第三种构造方法---------");
        Date date2 = new Date(new Date(3,2,2022));
        date2.tomorrow();
        date2.yesteday();
        date2.daysinyear();
        System.out.println("-----------------------------");
        System.out.println("-------第四种构造方法---------");
        String d = "2022-1-1";
        Date date4 = new Date(d);
        date4.tomorrow();
        date4.yesteday();
        date4.daysinyear();

        ///第二题
        System.out.println("---------------第二题---------------");
        Rect rect = new Rect(2,3);
        System.out.println(rect);

        Circle circle = new Circle(2);
        System.out.println(circle);

        Triangle triangle = new Triangle(4,8,6);
        System.out.println(triangle);


    }
}
